#pragma once


// EditItemDlg dialog

#include "EditItemPanel.h"

namespace serika
{
	namespace dq
	{
		class ItemListPanel;

		class EditItemDlg : public CDialog
		{
			DECLARE_DYNAMIC(EditItemDlg)

		public:
			EditItemDlg(CWnd* pParent = NULL);   // standard constructor
			virtual ~EditItemDlg();

			// Dialog Data
			enum { IDD = IDD_EDITITEMDLG };

			void SetItem(Item* item) { mPanel.SetItem(item); }
			void SetItemListPanel(ItemListPanel* panel) { mItemListPanel = panel; }
			void SetIndex(int index) { mIndex = index; }

		protected:
			virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

			virtual BOOL OnInitDialog();
			DECLARE_MESSAGE_MAP()
			afx_msg void OnDestroy();
			afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);

			virtual void OnCancel();
			virtual void OnOK();

		private:
			EditItemPanel mPanel;
			ItemListPanel* mItemListPanel;
			int mIndex;
		};
	}
}

